package com.app.designpatternslearn.structured.decoratorpattern

import com.app.designpatternslearn.structured.decoratorpattern.code.ConcreteComponent
import com.app.designpatternslearn.structured.decoratorpattern.code.ConcreteDecoratorA
import com.app.designpatternslearn.structured.decoratorpattern.code.ConcreteDecoratorB
import com.app.designpatternslearn.structured.decoratorpattern.code.ConcreteDecoratorC

fun main() {

    val component = ConcreteComponent()

    val concreteDecoratorA = ConcreteDecoratorA(component)

    val concreteDecoratorB = ConcreteDecoratorB(concreteDecoratorA)

    val concreteDecoratorC = ConcreteDecoratorC(concreteDecoratorB)

    concreteDecoratorC.operate()
}